package com.addcn.pushlibrary.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * author:luwenbo
 * created on date : 2019-05-14
 * content:
 * describe:
 */
public class PMessage implements Parcelable {
    private String id = "";//通知ID
    private String title;//推送标题
    private String url;//调整地址
    private String content;//推送内容
    private String bigThumb;//大图
    private String clean = "0";//是否可以清除通知 1不可以清除 默认是0
    private String extra;//自定义字段
    private int fromType=0;//推送来源

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public String getBigThumb() {
        return bigThumb;
    }

    public void setBigThumb(String bigThumb) {
        this.bigThumb = bigThumb;
    }

    public int getFromType() {
        return fromType;
    }

    public void setFromType(int fromType) {
        this.fromType = fromType;
    }

    public String getClean() {
        return clean;
    }

    public void setClean(String clean) {
        this.clean = clean;
    }



    public static int FROM_JPUSH = 0;//jpush
    public static int FROM_FCM = 1;//fcm
    public static int FROM_OPPO = 2;//fcm
    public static int FROM_VIVO = 3;//fcm
    public static int FROM_XIAOMI = 4;//fcm
    public static int FROM_HUAWEI = 5;//fcm

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.title);
        dest.writeString(this.url);
        dest.writeString(this.content);
        dest.writeString(this.bigThumb);
        dest.writeString(this.clean);
        dest.writeString(this.extra);
        dest.writeInt(this.fromType);
    }

    public PMessage() {
    }

    public PMessage(Parcel in) {
        this.id = in.readString();
        this.title = in.readString();
        this.url = in.readString();
        this.content = in.readString();
        this.bigThumb = in.readString();
        this.clean = in.readString();
        this.extra = in.readString();
        this.fromType = in.readInt();
    }

    public static final Parcelable.Creator<PMessage> CREATOR = new Parcelable.Creator<PMessage>() {
        @Override
        public PMessage createFromParcel(Parcel source) {
            return new PMessage(source);
        }

        @Override
        public PMessage[] newArray(int size) {
            return new PMessage[size];
        }
    };
}
